#ifndef TYPE_REGISTER_INCLUDE
#define TYPE_REGISTER_INCLUDE

#include <string>
#include <memory>
#include "test_types.hpp"

// Support type determination across so files when using no-rtti.
// With no-rtti, we can not use typeid, type_info etc. , so we use the pre-registered type name.
template<typename T> const char* GetTypeName(void);
template<typename T> const char* GetTypeName(T) { return GetTypeName<T>(); }

#define REFLECTION_REGISTER_TYPE(type) \
    template <> const char* GetTypeName<type>(void) { return #type; }

REFLECTION_REGISTER_TYPE(std::string)
REFLECTION_REGISTER_TYPE(shared_test_lib::big_data)
REFLECTION_REGISTER_TYPE(shared_test_lib::small_data)
REFLECTION_REGISTER_TYPE(int)
REFLECTION_REGISTER_TYPE(float)
REFLECTION_REGISTER_TYPE(void*)
REFLECTION_REGISTER_TYPE(std::shared_ptr<big_type>)
REFLECTION_REGISTER_TYPE(big_type)
REFLECTION_REGISTER_TYPE(words<2ull>)
REFLECTION_REGISTER_TYPE(words<3ull>)
REFLECTION_REGISTER_TYPE(regression1_type)
REFLECTION_REGISTER_TYPE(std::shared_ptr<int>)

#endif

